<?php

use backend\modules\rbac\AnimateAsset;
use yii\helpers\Html;
use yii\helpers\Json;
use yii\helpers\Url;
use yii\web\YiiAsset;

/* @var $this yii\web\View */
/* @var $routes [] */

$this->title = '路由管理';

AnimateAsset::register($this);
YiiAsset::register($this);
$opts = Json::htmlEncode([
    'routes' => $routes,
]);
$this->registerJs("var _opts = {$opts};");
$this->registerJs($this->render('_script.js'));
$animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>';
?>


<div class="ibox-content">
  <div class="row">
      <div class="col-sm-11">
          <div class="input-group">
              <input id="inp-route" type="text" class="form-control"  placeholder="新增路由">
              <span class="input-group-btn">
                <?=Html::a('添加' . $animateIcon, ['create'], ['class' => 'btn btn-success', 'id' => 'btn-new',]);?>
              </span>
          </div>
      </div>
  </div>
  <p>&nbsp;</p>
  <div class="row">
      <div class="col-sm-5">
          <div class="input-group">
              <input class="form-control search" data-target="available" placeholder="搜索">
              <span class="input-group-btn">
                  <?=Html::a('<span class="glyphicon glyphicon-refresh"></span>', ['refresh'], ['class' => 'btn btn-default','id' => 'btn-refresh',]);?>
              </span>
          </div>
          <select multiple size="20" class="form-control list" data-target="available"></select>
      </div>
      <div class="col-sm-1">
          <br /><br />
          <?=Html::a('&gt;&gt;' . $animateIcon, ['assign'], ['class' => 'btn btn-success btn-assign','data-target' => 'available','title' => '授权',]);?><br /><br />
          <?=Html::a('&lt;&lt;' . $animateIcon, ['remove'], ['class' => 'btn btn-danger btn-assign','data-target' => 'assigned','title' => '移除',]); ?>
      </div>
      <div class="col-sm-5">
          <input class="form-control search" data-target="assigned" placeholder="搜索">
          <select multiple size="20" class="form-control list" data-target="assigned"></select>
      </div>
  </div>
</div>
